import React, { useState } from "react";
import OutsocurStyle from './outsocur.module.css'
import { Table, Input, Button ,Modal } from "antd"
import {ReactComponent as ResIcon} from '../../assets/icon/刷新.svg'
const { Search } = Input;
function OutsocurPages() {
  const [isModalOpen, setIsModalOpen] = useState(false);
  const showModal = () => {
    setIsModalOpen(true);
  };
  const handleOk = () => {
    setIsModalOpen(false);
  };
  const handleCancel = () => {
    setIsModalOpen(false);
  };
  const onSearch = (value, _e, info) => console.log(info?.source, value);
  const colums=[
    {
      key:"1",
      dataIndex:"供应商单位",
      title:"供应商单位",
      align:"center"
    },
    {
      key:"2",
      dataIndex:"单位编号",
      title:"单位编号",
      align:"center"
    },
    {
      key:"3",
      dataIndex:"联系人姓名",
      title:"联系人姓名",
      align:"center"
    },
    {
      key:"4",
      dataIndex:"联系人编号",
      title:"联系人编号",
      align:"center"
    },
    {
      key:"5",
      dataIndex:"联系人电话",
      title:"联系人电话",
      align:"center"
    },
    {
      key:"6",
      dataIndex:"联系人邮箱",
      title:"联系人邮箱",
      align:"center"
    },
    {
      key:"7",
      dataIndex:"单位税号",
      title:"单位税号",
      align:"center"
    },{
      key:"8",
      dataIndex:"开户行",
      title:"开户行",
      align:"center"
    },
    {
      key:"9",
      dataIndex:"银行账号",
      title:"银行账号",
      align:"center"
    },
    {
      key:"10",
      dataIndex:"外包金额",
      title:"外包金额",
      align:"center"
    },
    {
      key:"11",
      dataIndex:"转款金额",
      title:"转款金额",
      align:"center"
    },
    {
      key:"12",
      dataIndex:"待转金额",
      title:"待转金额",
      align:"center"
    }
  ]
  return (
    <div className={OutsocurStyle.Outsocur_app}>
       <Modal title="Basic Modal" open={isModalOpen} onOk={handleOk} onCancel={handleCancel}>
        <p>Some contents...</p>
        <p>Some contents...</p>
        <p>Some contents...</p>
      </Modal>
      <div className={OutsocurStyle.Outsocur_Table_form}>
        <Search
          placeholder="input search text"
          onSearch={onSearch}
          style={{
            width: 200,
            marginRight: "10px",
          }}
        />
        <Button style={{ marginRight: "10px" }}
        onClick={showModal}
        >新增</Button>
        <Button style={{ display: "flex", alignItems: "center" }}>
          <ResIcon width={15} />
          <span style={{ margin: "0 5px" }}>重置</span>
        </Button>
      </div>
      <Table columns={colums}/>
    </div>
  )
}

export default OutsocurPages
